﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Codebehind="buyapp.aspx.cs"
    Inherits="LabMS.Web.Equipment.common.buyapp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>购买申请</title>
    <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <link href="../../css/jquery.wysiwyg.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../../style/ie7.css" />
    <![endif]-->
</head>
<body class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        <a href="buyapplist.aspx">购买申请列表</a></label>&gt;仪器申请购买
                </div>
            </div>
        </div>
        <div class="main">
            <p>
                <asp:Button ID="AppBtn" runat="server" CssClass="button" OnClick="Save_OnClick" Text="申请" />
                <asp:Button ID="SaveBtn" runat="server" CssClass="button" OnClick="Save_OnClick"
                    Text="保存" />
            </p>
            <table>
                <tr>
                    <td>
                        <label class="itemTitle">
                            申请购买类型：<span style="color: Red">*</span></label>
                    </td>
                    <td>
                        <asp:DropDownList ID="TypeDDL" runat="server" ToolTip="申请购买类型">
                            <asp:ListItem Text="消耗品" Value="xiaohaopin"></asp:ListItem>
                            <asp:ListItem Text="低值品" Value="lowvalue"></asp:ListItem>
                            <asp:ListItem Text="仪器" Value="yiqi"></asp:ListItem>
                            <asp:ListItem Text="贵重仪器" Value="guizhongyiqi"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            分类号码：<span style="color: Red">*</span></label>
                    </td>
                    <td>
                        <asp:TextBox ID="NumbersTBX" runat="server" ToolTip="分类号 - 必填项"></asp:TextBox>
                        <input id="Button1" name="Button1" onclick="OpenEditWin(500,400,'NumbersTBX','NameTBX')"
                            type="button" value="..." />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            仪器名称：<span style="color: Red">*</span></label>
                    </td>
                    <td>
                        <asp:TextBox ID="NameTBX" runat="server" ToolTip="仪器名 - 必填项"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            申请购买数量：<span style="color: Red">*</span></label>
                    </td>
                    <td>
                        <asp:TextBox ID="NumTBX" runat="server" MaxLength="32" ToolTip="申请购买数量 - 必填项-请输入数字"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            申请备注：</label>
                    </td>
                    <td>
                        <asp:TextBox ID="AppCommentTBX" runat="server" Rows="20" Columns="80" TextMode="MultiLine"
                            ToolTip="申请备注"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
    </form>

    <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

    <script type="text/javascript" src="../../js/jQuery/jquery.tooltip.js"></script>

    <script type="text/javascript" src="../../js/jQuery/jquery.bgiframe.js"></script>

    <script type="text/javascript" src="../../js/jQuery/jquery.validate.js"></script>

    <script type="text/javascript" src="../../js/jQuery/jquery.wysiwyg.js"></script>

    <script type="text/javascript" src="../../js/site.js"></script>

    <script type="text/javascript">
          $(function(){
            $("#form1").validate({
                rules: {
                    NumbersTBX: {
                        required: true
                    },
                    NumTBX: {
                        required: true,
                        number: true,
                        min:1,
                        maxlength:32
                    }
                },
                messages: {
                    NumbersTBX: {
                        required: "请选择分类号码"
                    },
                    NumTBX: {
                        required: "请输入购买数量",
                        number:"只能输入数字",
                        min:"购买数量不能小于1",
                        maxlength:"输入长度不能超过32个字符"
                    }
                }
            });
            $("#AppCommentTBX").wysiwyg();

        });
        
        
          function OpenEditWin(width, height,Element1,Element2) 
          {
              var me;
              me = window;
              var ret = window.showModalDialog('../Dictionary.aspx?Type=' + $("#TypeDDL").val(), me, 'dialogWidth=' + width + 'px;dialogHeight=' + height + 'px;help:no;status:no');
              if (ret != null) 
                {
                  document.getElementById(Element1).value = ret[0];
                  document.getElementById(Element2).value = ret[1];
                }
         }
    </script>

</body>
</html>
